package com.example.presentshopping.ui.activity

import android.app.Dialog
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.presentshopping.R
import com.example.presentshopping.config.base.BaseMvpActivity
import com.example.presentshopping.ui.dialog.MessageDialog
import com.example.presentshopping.utils.tool.IntentJumpUtils
import kotlinx.android.synthetic.main.activity_location.*
import kotlinx.android.synthetic.main.activity_location.title_main_tv
import kotlinx.android.synthetic.main.activity_setting.*

class SettingActivity : BaseMvpActivity() {

    override val layoutId: Int
        get() =R.layout.activity_setting

    override fun initView(savedInstanceState: Bundle?) {

        title_main_tv.leftBackImageTv.setOnClickListener { finish() }
        iv_share0.setOnClickListener { startActivity(Intent(this,SetupPayPwdCheckActivity().javaClass)) }
        iv_share1.setOnClickListener {
            MessageDialog.Builder(this)
                .setTitle("")
                .setTvTitle("")
                .setMessage("是否退出登录")
                . setConfirm("确定")
                .setCancel("取消")
                .setListener(object :MessageDialog.OnListener{
                    override fun onConfirm(dialog: Dialog?) {
                        IntentJumpUtils.Logout(this@SettingActivity,true)
                    }

                    override fun onCancel(dialog: Dialog?) {

                    }

                }).show()

        }
        

    }


    override fun showToast(msg: String?) {

    }

    override fun onSuccess(data: String?) {

    }

    override fun onFailure(e: Throwable?, code: Int, msg: String?, isNetWorkError: Boolean) {

    }
}